Skip to content

Comments

feat(security): mitigate SSRF and information leakage#672

Merged
bug-ops merged 1 commit intomainfrom
feat/624-ssrf-info-leakage
Feb 20, 2026
Merged

feat(security): mitigate SSRF and information leakage#672
bug-ops merged 1 commit intomainfrom
feat/624-ssrf-info-leakage

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 19, 2026

Summary

  • Scrape executor validates resolved IPs against private/loopback ranges and pins reqwest client to validated addresses, eliminating DNS rebinding TOCTOU
  • Private host blocklist expanded to *.localhost, *.internal, *.local domains
  • A2A error responses sanitized: serde parse details and method names no longer exposed to clients
  • Rate limiter enforces entry cap with 429 rejection when map is full after stale eviction
  • Secret redaction rewritten with regex-based pattern matching, detecting secrets inside URLs, JSON, and quoted strings
  • Added hf_, npm_, dckr_pat_ to redaction prefixes
  • A2A client stream errors truncate upstream body to 256 bytes

Test plan

  • 2041/2041 tests pass (cargo nextest run --workspace --lib --bins)
  • SSRF: resolve_and_validate rejects 127.0.0.1, 10.x, 192.168.x, ::1
  • Private host: *.localhost, *.internal, *.local blocked
  • A2A error sanitization: 4 handler tests verify no serde/method leakage
  • Rate limiter: cap enforcement tested with fresh and stale entries
  • Redaction: secrets in URLs, JSON, quoted strings detected
  • Security audit passed (AUD-01 through AUD-04 addressed)
  • cargo +nightly fmt --check clean
  • cargo clippy --workspace -- -D warnings clean

Closes #624

Scrape executor: post-DNS resolution validation with pinned-address
reqwest client eliminates DNS rebinding TOCTOU. Private host check
expanded to block *.localhost, *.internal, *.local domains.

A2A server: error responses sanitized to hide serde details and method
names. Rate limiter enforces entry cap with 429 rejection on overflow.

Redact: regex-based pattern matching replaces whitespace tokenizer,
catching secrets in URLs, JSON values, and quoted strings. Added hf_,
npm_, dckr_pat_ prefixes.

A2A client: upstream error bodies truncated to 256 bytes.

Closes #624
@bug-ops bug-ops force-pushed the feat/624-ssrf-info-leakage branch from 4a19ef8 to b554082 Compare February 20, 2026 00:06
@bug-ops bug-ops merged commit ede81af into main Feb 20, 2026
20 checks passed
@bug-ops bug-ops deleted the feat/624-ssrf-info-leakage branch February 20, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core dependencies documentation Improvements or additions to documentation enhancement New feature or request rust size/XL

Projects

None yet

1 participant